import request from '@/utils/request'
import {getToken} from '@/utils/auth'
var token = getToken()
//列表

export function getStaffList(data,id,pageData) {
  return request({
    url: '/staff/page/by/'+id+'/'+pageData.pageNo+'/'+pageData.pageSize,
    method: 'post',
    headers:{'Content-Type':'application/json'},
    data
  })
}
//新增
export function getStaffAdd(data) {
    return request({
      url: '/staff/add',
      method: 'post',
      data
    })
  }

// 修改
export function getStaffUpdate(data) {
    return request({
      url: '/staff/update',
      method: 'post',
      data
    })
  }


// 查看
export function getStaffDetail(id) {
    return request({
      url: '/staff/detail/'+id,
      method: 'get',
    })
  }

// 删除
export function getStaffDelete(id) {
    return request({
      url: '/staff/delete/'+id,
      method: 'get',
    })
  }

  export function getStaffExpor(id) {
	  return request({
	    url: '/staff/export/'+id,
	    method: 'get',
	    responseType:'blob'
	  })
	}